package 实验二;

public class Course {
	private String cId;
	private String cName;
	private String location;
	private String time;
	private Teacher teacher;
	public Course(String cId,String cName,String location,String time,Teacher teacher) {
		this.cId=cId;
		this.cName=cName;
		this.location=location;
		this.time=time;
		this.teacher=teacher;
	}
    public String getCId() { return cId; }
    public void setCid(String cId) { this.cId = cId; }
    
    public String getCName() { return cName; }
    public void setCName(String cName) { this.cName = cName; }
    
    public String getLocation() { return location; }
    public void setLocation(String location) { this.location = location; }
    
    public String getTime() { return time; }
    public void setTime(String time) { this.time = time; }
    
    public Teacher getTeacher() { return teacher; }
    public void setTeacher(Teacher teacher) { this.teacher = teacher; }
    
    public String toString() {
        return "课程编号：" + cId + "，课程名称：" + cName + "，上课地点：" + location + 
               "，上课时间：" + time + "，授课教师：" + teacher.getName();
    }

}
